def parse_device_check(data, columns_lst):
    if data is None or "list" not in data:
        return None

    data_lst = data["list"]
    if not data_lst:
        data_lst = []

    # 真实要获取的字段
    columns_lst = ["devicePointName","type","repairState","createdAt","operator","desc"]
    res_table_columns = ["巡点名称","关联类型","关联名称","维修单状态","巡检时间","巡检员","异常备注"]



    repairState_mapping = {
        0:"无需维修",
        1:"维修单生成",
        2:"正在维修",
        3:"维修已完成"
    }


    res_table = []

    for row in data_lst:
        row_lst = []
        for column in columns_lst:
            v = row[column]
            if column == "type":
                if v == 1:
                    row_lst.append("设备")
                    row_lst.append(row.get("deviceName"))
                elif v == 2:
                    row_lst.append("区域")
                    row_lst.append(row.get("areaName"))
                else:
                    row_lst.append(v)
                    row_lst.append("")

            elif column == "repairState":
                if v in repairState_mapping:
                    v = repairState_mapping[v]
                row_lst.append(v)
            else:
                row_lst.append(v)
        res_table.append(row_lst)


    return {
        "res_table_title": "查询【巡检打卡】相关数据如下：",
        "res_table_columns": res_table_columns,
        "res_table": res_table
    }